package stud.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import stud.aistar.entity.SecondDepartment;
import stud.aistar.mapper.SecondDepartmentMapper;
import stud.aistar.service.ISecondDepartmentService;
import stud.aistar.vo.DepartmentVo;

import java.util.List;

/**
 * Created by Jcdz on 2019/9/28.
 */
@Service
@Transactional
public class SecondDepartmentServiceImpl implements ISecondDepartmentService {

    @Autowired
    private SecondDepartmentMapper secondDepartmentMapper;

    @Override
    public List<SecondDepartment> findAll() {
        return secondDepartmentMapper.findAll();
    }

    @Override
    public List<SecondDepartment> findByDeptId(Integer id) {
        return secondDepartmentMapper.findByDeptId(id);
    }

    @Override
    public SecondDepartment findById(Integer id) {

        SecondDepartment secondDepartment = secondDepartmentMapper.findById(id);
        return secondDepartment;

    }

    @Override
    public Integer findDeptIdById(Integer id) {
        return secondDepartmentMapper.findDeptIdById(id);
    }

    @Override
    public List<SecondDepartment> findBydeptId(Integer deptId) {
        return secondDepartmentMapper.findBydeptId(deptId);
    }


}
